package com.randi.system.domain.entity.sysNotice;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@ApiModel(value = "SysNoticePush", description = "通告推送对象")
public class SysNoticePush implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "push_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "推送ID")
    private Long pushId;

    @TableField(value = "`notice_id`")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "通告ID")
    private Long noticeId;

    @TableField(value = "`user_id`")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "用户ID")
    private Long userId;

    public SysNoticePush(Long noticeId, Long userId){
        this.noticeId = noticeId;
        this.userId = userId;
    }
}
